package com.asset.entity;

public class User {
	// 用户ID
	private  Integer id;
	// 名
	private  String name;
	private  String userName;
	// 用户密码
	private  String password;
	// 角色ID
	private Integer rid;
	// 角色对象
	private Role role;
	private  Integer one_header;
	private  String  all_header;

	// 构造方法，传入用户名、密码、角色、头像ID、头像路径
	public User(String all_header, Integer id, String name,
				Integer ome_header,
				String password, Integer rid, Role role) {
		this.all_header = all_header;
		this.id = id;
		this.name = name;
		this.one_header = ome_header;
		this.password = password;
		this.rid = rid;
		this.role = role;
	}

	// 获取头像路径
	public String getAll_header() {
		return all_header;
	}

	// 设置头像路径
	public void setAll_header(String all_header) {
		this.all_header = all_header;
	}

	public String getUserName() {
		return userName;
	}

	public User(String all_header, Integer id, String name, Integer one_header, String password, Integer rid, Role role, String userName) {
		this.all_header = all_header;
		this.id = id;
		this.name = name;
		this.one_header = one_header;
		this.password = password;
		this.rid = rid;
		this.role = role;
		this.userName = userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	// 获取用户ID
	public Integer getId() {
		return id;
	}

	// 设置用户ID
	public void setId(Integer id) {
		this.id = id;
	}

	// 获取用户名
	public String getName() {
		return name;
	}

	// 设置用户名
	public void setName(String name) {
		this.name = name;
	}

	// 获取头像ID
	public Integer getOne_header() {
		return one_header;
	}

	// 设置头像ID
	public void setOne_header(Integer one_header) {
		this.one_header = one_header;
	}

	// 获取用户密码
	public String getPassword() {
		return password;
	}

	// 设置用户密码
	public void setPassword(String password) {
		this.password = password;
	}

	// 获取角色ID
	public Integer getRid() {
		return rid;
	}

	// 设置角色ID
	public void setRid(Integer rid) {
		this.rid = rid;
	}

	// 获取角色对象
	public Role getRole() {
		return role;
	}

	// 设置角色对象
	public void setRole(Role role) {
		this.role = role;
	}

	// 无参构造方法
	public User() {


	}

	// 重写toString方法，返回用户信息
	@Override
	public String
	toString() {
		return "User{" +
				"all_header='" + all_header + '\'' +
				", id=" + id +
				", name='" + name + '\'' +
				", password='" + password + '\'' +
				", rid=" + rid +
				", role=" + role +
				", one_header=" + one_header +
				'}';
	}
}
